package com.gfhd.feign.resttemplate;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@Service
public class RestTemplateDemo1 {
    @Resource
    RestTemplate restTemplate;
    public void test(){
        String s=restTemplate.getForObject("https://www.baidu.com", Object.class).toString();
        System.out.println(s);
    }
}
